<%@page import="org.apache.jasper.tagplugins.jstl.core.ForEach"%>
<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.etc.entity.User"%>
<%@page import="com.etc.service.impl.UserServiceImpl"%>
<%@page import="com.etc.service.UserService"%>
<%@page import="java.util.List"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<%
	if (null == request.getSession().getAttribute("user")) {
		request.getRequestDispatcher("login.jsp").forward(request, response);
	}
%>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>Dashboard Template for Bootstrap</title>
<link rel="stylesheet" href="dist/css/bootstrap.min.css">

<script src="dist/js/jquery-3.3.1.min.js"></script>

<link href="dist/css/bootstrap.min.css" rel="stylesheet">

<link href="css/dashboard.css" rel="stylesheet">
<link href="assets/css/font-awesome.css" rel="stylesheet" />
<link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
<link href="assets/css/custom-styles.css" rel="stylesheet" />

<script src="assets/js/jquery.metisMenu.js"></script>
<script src="assets/js/morris/raphael-2.1.0.min.js"></script>
<script src="assets/js/morris/morris.js"></script>
<script src="assets/js/easypiechart.js"></script>
<script src="assets/js/easypiechart-data.js"></script>
<script src="assets/js/Lightweight-Chart/jquery.chart.js"></script>
<script src="assets/js/custom-scripts.js"></script>
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style type="text/css">
.navbar .nav>li:hover .dropdown-menu {
	display: block;
}
</style>
</head>

<body>
	<nav class="navbar navbar-inverse navbar-fixed-top">
		<div class="container-fluid">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle collapsed"
					data-toggle="collapse" data-target="#navbar" aria-expanded="false"
					aria-controls="navbar">
					<span class="sr-only">Toggle navigation</span> <span
						class="icon-bar"></span> <span class="icon-bar"></span> <span
						class="icon-bar"></span>
				</button>
				<ul class="nav navbar-nav">
					<li class="dropdown"><a class="navbar-brand" href="#">问答系统</a>
						<a style="margin-left: 100px;" href="#"
						class="dropdown-toggle glyphicon glyphicon-user"
						data-toggle="dropdown" role="button" aria-haspopup="true"
						aria-expanded="false">欢迎~${user.userName}~登录管理系统<span
							class="caret"></span></a>
						<ul class="dropdown-menu" style="margin-left: 100px;">
							<li><a href="#">个人信息</a></li>
							<li><a href="#">切换账号</a></li>
							<li><a href="#">退出</a></li>
						</ul></li>
				</ul>
			</div>
			<div id="navbar" class="navbar-collapse collapse">
				<ul class="nav navbar-nav navbar-right">
					<li><a id="imfor" href="#"></a></li>
					<li><a href="#">仪表盘</a></li>
					<li><a href="#">设置</a></li>
					<li><a href="LoginServlet?op=exit">退出</a></li>
					<li id="btnLo"><a id="modal-27331"
						href="#modal-container-27331" role="button" class="btn"
						data-toggle="modal">登录</a></li>
					<li id="btnExit" style="display: none;"><a
						href="${pageContext.request.contextPath}/UserServlet?op=queryPage"
						class="btn">退出</a></li>
					<li><a href="#">帮助</a></li>
				</ul>
				<form class="navbar-form navbar-right">
					<input type="text" id="searchName" class="form-control"
						placeholder="Search..." value="${nameLike==null?"":nameLike}">
					<input type="button" id="btnSearch" class="form-control" value="搜索">
				</form>
			</div>
		</div>
	</nav>

	<div class="container-fluid">
		<div class="row">
			<div class="col-sm-3 col-md-2 sidebar">
				<ul class="nav nav-sidebar">
					<li class="active"><a href="">首页 <span class="sr-only">(current)</span></a></li>
					<li><a href="qs?op=queryPage">问答信息管理</a></li>
					<li><a href="addQuestion.jsp">增加问答信息</a></li>
					<li><a href="ab?op=queryPage">回答信息管理</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a
						href="${pageContext.request.contextPath}/UserServlet?op=queryPage">用户管理</a></li>
					<li><a href="addUser.jsp">新增用户</a></li>
					<li><a href="EmpServlet?op=queryPage">员工管理</a></li>
					<li><a href="">Another nav item</a></li>
					<li><a href="">More navigation</a></li>
				</ul>
				<ul class="nav nav-sidebar">
					<li><a href="">Nav item again</a></li>
					<li><a href="">One more nav</a></li>
					<li><a href="">Another nav item</a></li>
				</ul>
			</div>
			<div id="page-wrapper">
				<div id="page-inner">


					<div class="row">
						<div class="col-md-10">
							<h1 class="page-header">
								欢迎登录 <small>问答管理系统</small>
							</h1>
							<ol class="breadcrumb">
								<li><a href="#">Home</a></li>
							</ol>
						</div>
					</div>

					<div class="row">
						<div class="col-md-3 col-sm-10 col-xs-10">
							<div
								class="panel panel-primary text-center no-boder bg-color-green green">
								<div class="panel-left pull-left green">
									<i class="fa fa-eye fa-5x"></i>

								</div>
								<div class="panel-right">
									<h3>8,457</h3>
									<strong> 发布信息人数</strong>
								</div>
							</div>
						</div>
						<div class="col-md-3 col-sm-10 col-xs-10">
							<div
								class="panel panel-primary text-center no-boder bg-color-blue">
								<div class="panel-left pull-left blue">
									<i class="fa fa-shopping-cart fa-5x"></i>
								</div>

								<div class="panel-right">
									<h3>52,160</h3>
									<strong>总用户人数</strong>

								</div>
							</div>
						</div>
						<div class="col-md-3 col-sm-10 col-xs-10">
							<div
								class="panel panel-primary text-center no-boder bg-color-red">
								<div class="panel-left pull-left red">
									<i class="fa fa fa-comments fa-5x"></i>

								</div>
								<div class="panel-right">
									<h3>15,823</h3>
									<strong>回复问题次数</strong>

								</div>
							</div>
						</div>
						<div class="col-md-3 col-sm-10 col-xs-10">
							<div
								class="panel panel-primary text-center no-boder bg-color-brown">
								<div class="panel-left pull-left brown">
									<i class="fa fa-users fa-5x"></i>

								</div>
								<div class="panel-right">
									<h3>36,752</h3>
									<strong>浏览次数</strong>

								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-md-5">
							<div class="panel panel-default">
								<div class="panel-heading">问题统计</div>
								<div class="panel-body">
									<div id="morris-area-chart"></div>
								</div>
							</div>
						</div>

						<div class="col-md-7">
							<div class="panel panel-default">
								<div class="panel-heading">用户统计</div>
								<div class="panel-body">
									<div id="morris-line-chart"></div>
								</div>
							</div>
						</div>

					</div>



					<div class="row">
						<div class="col-xs-6 col-md-3">
							<div class="panel panel-default">
								<div class="panel-body easypiechart-panel">
									<h4>Customers</h4>
									<div class="easypiechart" id="easypiechart-blue"
										data-percent="82">
										<span class="percent">82%</span>
									</div>
								</div>
							</div>
						</div>
						<div class="col-xs-6 col-md-3">
							<div class="panel panel-default">
								<div class="panel-body easypiechart-panel">
									<h4>Sales</h4>
									<div class="easypiechart" id="easypiechart-orange"
										data-percent="55">
										<span class="percent">55%</span>
									</div>
								</div>
							</div>
						</div>
						<div class="col-xs-6 col-md-3">
							<div class="panel panel-default">
								<div class="panel-body easypiechart-panel">
									<h4>Profits</h4>
									<div class="easypiechart" id="easypiechart-teal"
										data-percent="84">
										<span class="percent">84%</span>
									</div>
								</div>
							</div>
						</div>
						<div class="col-xs-6 col-md-3">
							<div class="panel panel-default">
								<div class="panel-body easypiechart-panel">
									<h4>No. of Visits</h4>
									<div class="easypiechart" id="easypiechart-red"
										data-percent="46">
										<span class="percent">46%</span>
									</div>
								</div>
							</div>
						</div>
					</div>
					<!--/.row-->


					<div class="row">
						<div class="col-md-9 col-sm-12 col-xs-12">
							<div class="panel panel-default">
								<div class="panel-heading">Bar Chart Example</div>
								<div class="panel-body">
									<div id="morris-bar-chart"></div>
								</div>
							</div>
						</div>
						<div class="col-md-3 col-sm-12 col-xs-12">
							<div class="panel panel-default">
								<div class="panel-heading">Donut Chart Example</div>
								<div class="panel-body">
									<div id="morris-donut-chart"></div>
								</div>
							</div>
						</div>

					</div>
					<div class="row">
						<div class="col-md-12"></div>
					</div>
					<!-- /. ROW  -->





					<div class="row">
						<div class="col-md-4 col-sm-12 col-xs-12">
							<div class="panel panel-default">
								<div class="panel-heading">Tasks Panel</div>
								<div class="panel-body">
									<div class="list-group">

										<a href="#" class="list-group-item"> <span class="badge">7
												minutes ago</span> <i class="fa fa-fw fa-comment"></i> Commented on
											a post
										</a> <a href="#" class="list-group-item"> <span class="badge">16
												minutes ago</span> <i class="fa fa-fw fa-truck"></i> Order 392
											shipped
										</a> <a href="#" class="list-group-item"> <span class="badge">36
												minutes ago</span> <i class="fa fa-fw fa-globe"></i> Invoice 653
											has paid
										</a> <a href="#" class="list-group-item"> <span class="badge">1
												hour ago</span> <i class="fa fa-fw fa-user"></i> A new user has
											been added
										</a> <a href="#" class="list-group-item"> <span class="badge">1.23
												hour ago</span> <i class="fa fa-fw fa-user"></i> A new user has
											added
										</a> <a href="#" class="list-group-item"> <span class="badge">yesterday</span>
											<i class="fa fa-fw fa-globe"></i> Saved the world
										</a>
									</div>
									<div class="text-right">
										<a href="#">More Tasks <i class="fa fa-arrow-circle-right"></i></a>
									</div>
								</div>
							</div>

						</div>
						<div class="col-md-8 col-sm-12 col-xs-12">

							<div class="panel panel-default">
								<div class="panel-heading">Responsive Table Example</div>
								<div class="panel-body">
									<div class="table-responsive">
										<table class="table table-striped table-bordered table-hover">
											<thead>
												<tr>
													<th>S No.</th>
													<th>First Name</th>
													<th>Last Name</th>
													<th>User Name</th>
													<th>Email ID.</th>
												</tr>
											</thead>
											<tbody>
												<tr>
													<td>1</td>
													<td>John</td>
													<td>Doe</td>
													<td>John15482</td>
													<td>name@site.com</td>
												</tr>
												<tr>
													<td>2</td>
													<td>Kimsila</td>
													<td>Marriye</td>
													<td>Kim1425</td>
													<td>name@site.com</td>
												</tr>
												<tr>
													<td>3</td>
													<td>Rossye</td>
													<td>Nermal</td>
													<td>Rossy1245</td>
													<td>name@site.com</td>
												</tr>
												<tr>
													<td>4</td>
													<td>Richard</td>
													<td>Orieal</td>
													<td>Rich5685</td>
													<td>name@site.com</td>
												</tr>
												<tr>
													<td>5</td>
													<td>Jacob</td>
													<td>Hielsar</td>
													<td>Jac4587</td>
													<td>name@site.com</td>
												</tr>
												<tr>
													<td>6</td>
													<td>Wrapel</td>
													<td>Dere</td>
													<td>Wrap4585</td>
													<td>name@site.com</td>
												</tr>

											</tbody>
										</table>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>
				<!-- /. PAGE INNER  -->
			</div>
		</div>
		<div class="modal fade" id="modal-container-27332" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div style="z-index: 10000;" class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">×</button>
						<form class="form-horizontal" role="form"
							action="${pageContext.request.contextPath}/qs?op=update"
							method="post">
							<div class="form-group" style="display: none;">
								<label for="qId" class="col-sm-2 control-label">请输入要修改的id</label>
								<div class="col-sm-8">
									<input type="text" required="required" class="form-control"
										name="qId" id="qId" />
								</div>
							</div>
							<div class="form-group">
								<label for="qTitle" class="col-sm-2 control-label">请输入要修改的标题</label>
								<div class="col-sm-8">
									<input type="text" required="required" class="form-control"
										name="qTitle" id="qTitle" />
								</div>
							</div>
							<div class="form-group">
								<label for="qContent" class="col-sm-2 control-label">请输入要修改的内容</label>
								<div class="col-sm-8">
									<textarea rows="5" class="form-control" name="qContent"
										id="qContent"></textarea>
								</div>
							</div>

							<div class="form-group">
								<label for="qDate" class="col-sm-2 control-label">请输入要修改的时间</label>
								<div class="col-sm-8">
									<input type="datetime-local" required="required"
										class="form-control" name="qDate" id="qDate" />
								</div>
							</div>
							<div class="form-group">
								<label for="userId" class="col-sm-2 control-label">请输入要修改的发布者</label>
								<div class="col-sm-4">
									<select class="form-control" name="userId" id="userId">

									</select>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-offset-5 col-sm-1">
									<button type="submit" style="width: 100px;"
										class="btn btn-danger">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>

			</div>
		</div>
		<div class="modal fade mtmst" id="modal-container-27331" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div style="z-index: 10000;" class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">×</button>
						<div id="loginSucess" style="display: none;">登入成功，请关闭窗口</div>
						<form id="formLogin" class="form-signin" method="post"
							onsubmit="return check()">
							<h2 class="form-signin-heading">请登录</h2>
							<div id="msg" style="display: none;">用户名或密码错误</div>
							<label for="userNameLogin" class="sr-only">用户名</label> <input
								type="text" id="userNameLogin" name="userNameLogin"
								class="form-control" placeholder="用户名" required autofocus>
							<label for="passWordLogin" class="sr-only">密码</label> <input
								type="password" id="passWordLogin" name="passWordLogin"
								class="form-control" placeholder="密码" required>
							<div class="checkbox">
								<label> <input type="checkbox" value="remember-me">
									记住我
								</label>
							</div>
							<a><button id="btnlogin"
									class="btn btn-lg btn-primary btn-block" type="button">登录</button></a>
						</form>
					</div>
				</div>

			</div>
		</div>
	</div>
	<script src="layer.js"></script>
</body>

</html>